  var mySwiper = new Swiper("#ying_sipder", {
      direction: 'horizontal', //默认horizontal, 水平轮播
      autoplay: false, //自动切换
      loop: true, //循环
      centeredSlides: true,
      slidesPerView: "auto", //默认1, 同时显示的slides数量,auto 代表根据轮播图的宽度排列
      spaceBetween: 20, //轮播图之间的间距
  })

  function tab(pid) {
      var tabs = ["tab1", "tab2", "tab3", "tab4"];
      for (let i = 0; i < 4; i++) {
          if (tabs[i] == pid) {
            document.getElementsByClassName(`box${i+1}`)[0].style.display = 'flex'
            document.getElementsByClassName(tabs[i])[0].className = tabs[i] + " TypeIndex";
          } else {
            document.getElementsByClassName(`box${i+1}`)[0].style.display = 'none'
              document.getElementsByClassName(tabs[i])[0].className = tabs[i];
          }
      }
  }

  function card(pid) {
      var tabs = ["card1", "card2", "card3", "card4"];
      Array.from(document.getElementsByClassName("phone-img")).forEach(v=>{
        v.className = 'phone-img animations'
      })
      for (let i = 0; i < 4; i++) {
          if (tabs[i] == pid) {
              Array.from(document.getElementsByClassName(tabs[i])).forEach(v=>{
                    v.className = tabs[i] + " cutIndex" + " card";
              })
            //   img.src = contentArr[active].img[i]
            Array.from(document.getElementsByClassName(`img${i+1}`)).forEach(v=>{
                v.style.display = 'block'
            })
          } else {
            Array.from(document.getElementsByClassName(tabs[i])).forEach(v=>{
                v.className = tabs[i] + " card";
              })

              Array.from(document.getElementsByClassName(`img${i+1}`)).forEach(v=>{
                v.style.display = 'none'
              })
          }
      }
  }

  function mobileTab(pid) {
      var tabs = ["tab1", "tab2", "tab3", "tab4"];
      for (let i = 0; i < 4; i++) {
          if (tabs[i] == pid) {
            document.getElementsByClassName(`box${i+1}`)[1].style.display = 'flex'
            document.getElementsByClassName(tabs[i])[1].className = tabs[i] + " TypeIndex";
          } else {
            document.getElementsByClassName(`box${i+1}`)[1].style.display = 'none'
              document.getElementsByClassName(tabs[i])[1].className = tabs[i];
          }
      }
  }